function modelInit() {
    right.toggleFocus();
}


/*
 * 1.右侧区
 */

cmsIndex.modules[cmsIndex.moduleGuid(cmsIndex.addModule())] = {
    modName: 'right',
    modNum: cmsIndex.moduleGuid(),
    map: {
        left: 0
    }
};

var right = cmsIndex.modules[cmsIndex.moduleGuid()].module = (function () {
    var mod = {
        modName: "login",
        modNum: cmsIndex.moduleGuid()
    };


    //操作
    mod.toggleFocus = function () {
        var me = mod;
        return me;
    };

    //index 位置调整
    mod.moveOp = function (directive) {
        var me = mod;
        return me;
    };
    mod.action = function (directive) {
        var me = mod;
        switch (directive) {
            case 'back':
                history.go(-1);
                break;
            case 'enter':
                direEnter();
                break;
        }
        return me;
    };
    mod.grabEvent = function (key) {
        var me = mod;
        var keyJson = TV.GetKey(key);
        if (keyJson.keyState && keyJson.keyState != 'enter' && keyJson.keyState != 'back') {
            me.moveOp(keyJson.keyState);
        } else {
            me.action(keyJson.keyState)
        }
        return keyJson.isBlock;


    };

    return mod;
})();
$(window).unload(function () {
    if (modelIndex.isVideo && mp) {
        mp.stop();
    }
});
cmsIndex.run();